﻿/**********************************************************************************
 * Description:     
 * MemberVariable:
 * Functions:       
 * Modify information:     
 * 2008-8-5     New           DuYaoHui     Create Class
 * 
 * ********************************************************************************/
using System;
using Fjaspx.Common;

namespace Fjaspx.UI.Web
{
    public partial class Administrator_tag_edit_tag_Custom : AdminPage
    {

        /// <summary>
        /// 
        /// </summary>
        Fjaspx.Sys.Bll.ROYcms_CustomTag bll = new Fjaspx.Sys.Bll.ROYcms_CustomTag();
        Fjaspx.Sys.Model.ROYcms_CustomTag Model = new Fjaspx.Sys.Model.ROYcms_CustomTag();
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            SystemCms.AdminSesion();
            if (!IsPostBack && Request["id"] != null)
            {
                Model = bll.GetModel(Convert.ToInt32(Request["id"]));
                TextBox_tag.Text = Model.TAG;
                TextBox_TagName.Text = Model.TAG_name;
                TextBox_tag_content.Text = Model.TAG_content;
            }
        }
        /// <summary>
        /// Handles the Click event of the Button_addTag control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Button_addTag_Click(object sender, EventArgs e)
        {
            if (Request["id"] != null)
            {
                Model.id = Convert.ToInt32(Request["id"]);
                Model.TAG = TextBox_tag.Text;
                Model.TAG_name = TextBox_TagName.Text;
                Model.TAG_content = TextBox_tag_content.Text;
                bll.Update(Model);
                Response.Redirect("/administrator/Message.aspx?message=编辑标签成功！&z=yes");
            }
        }
    }
}